// $Id: debug.java 4 2008-08-22 17:09:15Z moyekj@yahoo.com $

package com.hme.tivo.videostream;

public class debug {
   public static void print(String msg) {
   if (GLOBAL.DEBUG) {
      StackTraceElement[] trace = new Throwable().getStackTrace();
      if (trace.length >= 1) {
         StackTraceElement elt = trace[1];
         System.out.println(">>>" + elt.getFileName() + ": " + elt.getClassName() + "." +
            elt.getMethodName() + "(line " + elt.getLineNumber() + "): " + msg
         );
      } else
         System.out.println("[UNKNOWN CALLER]: " + msg);
      }
   }
}
